ci: wire RAG001 logging check into ci.yml on all OSes - #38
Merged
Conversation
audit.py uses stdlib `logging.getLogger("rag.audit")` because rag_observability
depends on rag_core.types, so any import from rag_core.audit into
rag_observability.logging (directly or via the rag_core.logging shim) would
create a circular import. This matches the policy described in CLAUDE.md.
Also document the policy in docs/guides/logging-policy.md, including the full
allowlist table and instructions for extending it.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
CLAUDE.md lists RAG001 (scripts/check_logging.py) as a blocking CI gate, but until now it only ran via pre-commit and `task lint:logging` — CI on GitHub never invoked it, which is how the audit.py violation fixed in PR #37 slipped to main. Add `uv run python scripts/check_logging.py` as a step in the existing `lint-test` matrix job so it runs on ubuntu-22.04, macos-14, and windows-latest alongside ruff and mypy. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
# Conflicts: # docs/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scripts/check_logging.py) among the blocking CI gates, but.github/workflows/ci.ymlnever invoked it. Until now it only ran via thepre-commithook and the localtask lint:loggingtarget — both opt-in. That is why thepackages/core/src/rag_core/audit.pyviolation fixed in fix(logging): allowlist rag_core/audit.py for RAG001 #37 slipped tomainunnoticed.uv run python scripts/check_logging.pyas a step in the existinglint-testmatrix job, so the check runs on ubuntu-22.04, macos-14, and windows-latest alongside Ruff and Mypy and is gated by the samechanges.outputs.pythonpath filter.Dependency
Depends on #37 (RAG001 allowlist fix for
rag_core/audit.py). This branch is based onfix/rag001-audit-allowlistso CI passes here. If #37 lands first, this PR fast-forwards ontomain; if this PR is reviewed first, it must wait for #37.Documentation
lint-testjob on all three CI OSes (was previously documented as pre-commit + Taskfile only).Test plan
uv run python scripts/check_logging.pyexits 0 locally on this branch (after fix(logging): allowlist rag_core/audit.py for RAG001 #37's allowlist fix)lint-test (ubuntu-22.04)step "RAG001 — logging policy check" passeslint-test (macos-14)step "RAG001 — logging policy check" passeslint-test (windows-latest)step "RAG001 — logging policy check" passes🤖 Generated with Claude Code